package com.mayuanfei.service.impl;

import com.aizuda.snailjob.client.core.annotation.Retryable;
import com.aizuda.snailjob.client.core.retryer.RetryType;
import com.mayuanfei.common.constant.SceneConstant;
import com.mayuanfei.service.LocalRemoteRetryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * TODO 类描述
 *
 * @author 老马
 * @date 2025-04-07 15:10
 */
@Slf4j
@Service
public class LocalRemoteRetryServiceImpl implements LocalRemoteRetryService {
    @Override
    @Retryable(scene = SceneConstant.LOCAL_REMOTE_RETRY, retryStrategy = RetryType.LOCAL_REMOTE, localTimes = 2, localInterval=5)
    public void localRemoteRetry(String params) {
        System.out.println("local remote retry 方法开始执行");
        throw new RuntimeException("local remote retry 方法执行异常");
    }
}